﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace Lib
{
    public class FileReader
    {
        public static List<string> ReadConnection(string url)
        {
            List<string> lst = new List<string>() ;
            StreamReader reader = File.OpenText(url);
            string input;
            while ((input = reader.ReadLine()) != null)
            {
                lst.Add(Lib.CreateCode.Decode(input));
            }
            reader.Close();
            return lst;
        }
       public static void WriteFile(string[]arr,string url)
       {
           StreamWriter writer = new StreamWriter(url);
           for (int i = 0; i < arr.Length; i++)
           {

               writer.WriteLine(arr[i]);
           }
           writer.Close();
       }
    }
}
